<div class="demo-container" dAnchorBox dAnchorHashSupport [view]="{ top: 60, bottom: 0 }">
  <d-demo-nav [navItems]="navItems"></d-demo-nav>
  <div class="demo-example" [dAnchor]="'basic-usage'">
    <div class="demo-title">基本用法</div>
    <div class="demo-text">
      跟随滚动效果请参考sticky
    </div>
    <d-codebox id="components-tabs-default" [sourceData]="basicSource">
      <d-anchor-basic demo></d-anchor-basic>
    </d-codebox>
  </div>

  <div class="demo-example" [dAnchor]="'asynchronous-loading'">
    <div class="demo-title">异步加载</div>
    <div class="demo-text">
      支持异步加载, 可以先加载菜单或者先加载内容，点击按钮切换加载
    </div>
    <d-codebox id="components-tabs-async" [sourceData]="asyncSource">
      <d-anchor-async demo></d-anchor-async>
    </d-codebox>
  </div>

  <div class="demo-example" [dAnchor]="'scroll-target'">
    <div class="demo-title">更换滚动容器</div>
    <div class="demo-text">
      通过scrollTarget更换滚动容器
    </div>
    <d-codebox id="components-tabs-scroll-target" [sourceData]="ScrollTargetSource">
      <d-anchor-scroll-target demo></d-anchor-scroll-target>
    </d-codebox>
  </div>

  <div class="demo-example" [dAnchor]="'support-hash'">
    <div class="demo-title">支持url锚点</div>
    <div class="demo-text">
      支持url的锚点哈希链接，支持更新哈希
    </div>
    <d-codebox id="components-tabs-async" [sourceData]="hashSource">
      <d-anchor-hash demo></d-anchor-hash>
    </d-codebox>
  </div>
</div>
